﻿#ifndef PST_POLARTRACER_H
#define PST_POLARTRACER_H

#include "LineChartTracer.h"

namespace pst {

    //class PolarTracer : public LineChartTracer
    //{
    //    Q_OBJECT
    //public:
    //    explicit PolarTracer(QCustomPlot* plot) : LineChartTracer(plot) { }
    //    ~PolarTracer() override { }
    //};

    class PolarTracerTableWidget : public TracerTableWidget
    {
        Q_OBJECT
    public:
        explicit PolarTracerTableWidget(QCustomPlot* parent);
        void AppendTracerProperty(LineChartTracer* tracer) override;
        /// @brief 文件写出至工程文件
        QDomElement& writeToProjectFile(QDomDocument* doc, QDomElement* element, GraphType graphType, bool isdiso = false) override;

        /// @brief 从工程文件读入数据
        void readFromProjectFile(QDomNodeList* nodelist, QCustomPlot* customPlot, GraphType graphType, bool isdiso = false) override;

    public slots:
        void slot_updateTracerProperty() override;
        void slot_updateTracerChange() override;

    protected:
    };

    class PolarMeasureTableWidget : public MeasureTableWidget
    {
        Q_OBJECT
    public:
        explicit PolarMeasureTableWidget(QCustomPlot* parent);

        void AppendTracerProperty(LineChartTracer* tracer) override;
        /// @brief 文件写出至工程文件
        QDomElement& writeToProjectFile(QDomDocument* doc, QDomElement* element, bool isdiso = false) override;

        /// @brief 从工程文件读入数据
        void readFromProjectFile(QDomNodeList* nodelist, QCustomPlot* customPlot, bool isdiso = false) override;

    public slots:
        void slot_updateTracerProperty() override;
        void slot_updateTracerChange() override;

    protected:
    };

} // namespace pst

#endif // PST_POLARTRACER_H
